package chapter1.dao;

import chapter1.domain.entity.BaseEntity;
import chapter1.domain.entity.vo.Result;

import java.util.Collection;


/**
 * 数据访问层-通用数据接口
 *
 * @author 郑植航
 * @since 2025/6/16 00:06
 */
public interface IBaseDao<Entity extends BaseEntity> {

    boolean  existById(int id);

    Entity findById(int id);

    Collection<Entity> list();

    Entity save(Entity entity);

    Entity delete(int id);

}
